package com.siashan.unipay4j.ali.transfer;

import com.siashan.unipay4j.core.IBaseEnum;
import com.siashan.unipay4j.core.transfer.TransferState;

/**
 * 支付宝支付转账状态
 *
 * @author  siashan
 * @since  v1.0.1
 **/
public enum AliTransferState implements IBaseEnum<String> {
    /**
     * 等待处理
     */
    @Deprecated
    INIT("INIT", "等待处理", TransferState.INIT),
    /**
     * 转账成功
     */
    SUCCESS("SUCCESS", "转账成功", TransferState.SUCCESS),
    /**
     * 转账失败
     */
    FAIL("FAILED", "转账失败", TransferState.FAILED),
    /**
     *退票
     */
    REFUND("REFUND", "退票", TransferState.BANK_FAIL),
    /**
     * 处理中
     */
    DEALING("PROCESSING", "处理中", TransferState.PROCESSING),
    /**
     * 状态未知
     */
    UNKNOWN("UNKNOWN", "状态未知", TransferState.UNKNOWN),
    ;
    private String value;
    private String desp;
    private TransferState transferState;

    AliTransferState(String value, String desp, TransferState transferState) {
        this.value = value;
        this.desp = desp;
        this.transferState = transferState;
    }

    @Override
    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    @Override
    public String getDesp() {
        return desp;
    }

    public void setDesp(String desp) {
        this.desp = desp;
    }

    public TransferState getTransferState() {
        return transferState;
    }

    public void setTransferState(TransferState transferState) {
        this.transferState = transferState;
    }
}
